feat(views): add a compact "event-row" collection view#3339
Open
Vidminas wants to merge 2 commits into
Open
Conversation
Adds a reusable compact row view (logo Β· title Β· date Β· location Β· summary) for talks/events/press lists β none of the existing views (card, article-grid, citation, date-title-summary, slides-gallery) is a compact horizontal row. - Uses the existing get_featured_image / get_event_dates / get_summary helpers. - Date + location stack on narrow screens and go inline with a separator from sm: up, so a wrapped line never opens with a lone separator. - Logo sits on a white chip even in dark mode (many event/press logos bake in a white background). - Summary is wrapped in a <div> (not <p>) to support multi-paragraph output. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Add an "Available Views" reference table to the Collection block README covering all six views (card, article-grid, citation, date-title-summary, slides-gallery, event-row) with a "best for" note, a layout description, and a front-matter usage example. Also corrects the "Multiple Views" feature bullet, which listed view names (compact, showcase, list, masonry) that never matched the actual view slugs. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
β Deploy Preview for academic-demo canceled.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
π What type of change is this?
π― What is the purpose of this change?
Adds a new
event-rowcollection view β a compact horizontal row: small logo Β· title Β· date Β·location, with the summary beneath. None of the existing views (
card,article-grid,citation,date-title-summary,slides-gallery) is a compact row like this, which is thenatural layout for talks / events / press mentions.
Three new files following the standard view convention (
--start/ view /--end):layouts/_partials/views/event-row.html,event-row--start.html,event-row--end.html.Built entirely on existing helpers (
get_featured_image,get_event_dates,get_summary) andfolds in a few niceties learned the hard way:
sm:up, so awrapped line never opens with a lone "Β·".
background and otherwise vanish.
<div>(not<p>) so multi-paragraph output stays valid.Enable it with
design.view: event-rowon acollectionblock. Verified on theacademic-cvstarter by pointing the Talks collection at it: the event renders as a compact row (logo chip,
title link, stacked date/location) with no view-resolution error.
πΈ Screenshots or Screencast (if applicable)
The same three talks on the academic-cv starter β existing
cardview vs the newevent-rowview, in both light and dark themes. Note how much more compact the row view is (twocards fill the height of all three rows). The logo sits on a white chip so dark logos with a transparent background stay visible in dark mode.view: event-row(the new view):view: date-title-summaryβ the closest existing view (no logo, date only, no location, less contained):view: cardβ the default view, for reference (much taller: two cards fill the height of all three rows above):βΉοΈ Documentation Check
Included in this PR: the Collection block README
(
modules/blox/blox/content-collection/README.md) gains an Available Views reference tablelisting all six views β including the new
event-rowβ with a "best for" note and a front-matterusage example. It also corrects the pre-existing "Multiple Views" bullet, whose names (
compact,showcase,list,masonry) never matched the actual view slugs.π Contributor Agreement
Thank you for your contribution!